package thin4ca

import scala.io.Source
import java.io.File

class TemplateFactory(root: String) {

  def read(fileName: String) : Template =
    new Template(Source.fromFile(root + fileName).mkString) 
  
  def listTemplates : Array[String] = {
    new File(root).listFiles.filter(_.isFile).map(_.getName)
  }
}
